package org.aceor.tennis.common.enums;

/**
 * Created by lxue on 16/5/14.
 */
public enum PlayApplyStatus {
    UNDO("未处理", 0),
    SUCCESS("申请成功", 1),
    FAILURE("申请失败", 2);

    private String desc;
    private Integer value;

    PlayApplyStatus(String desc, Integer value) {
        this.desc = desc;
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public Integer getValue() {
        return value;
    }

    public static PlayApplyStatus valueof(int value) {
        switch (value) {
            case 0:
                return UNDO;
            case 1:
                return SUCCESS;
            case 2:
                return FAILURE;
            default:
                throw new IllegalArgumentException();
        }
    }
}
